fixed genRender to be less crazy