fix encoding problem on rendered page