fixed more bugs in textrender