fixed function bug in textrender