fixing encoding in render