height calculation correction