Fix incorrect branch name check