Fixed some text rendering bugs