fix bug on render