Moved height validity check