Fixed bug in branch name parsing