return correctly when height = 0