fix subelement height calculation