fewer improvements in height calculation

@sapegin please review