fix issue with current branch detection