waiting for the render to finish