Fix getting branch name in update