fix bugs in renderView