fixing the rendering problem