fix bug when there are new line chars at the beginning of text label