fix branch name checking