fixing nil error if BRANCH does not exits