Fix ahead bug if an branch exist that is higher than master.