fix height comparison