fix bug in last commit - only hide branch if everything is ok