Current branch name was not being read correctly