fixed the branch name handling