fix render page code