fix bug where new branch would not be checked out