Fixed a wrong height calculation