correctly check original branch name