corrected height detection when dealing with ground below a height of 0