fixed bug on rendering