Fixed bug in text height calculation