Fixed bug in new minimum-altitude check