Fix getCurrentBranch