Fixed some bugs in text attributes.