fix rendertext fucntion