Fixed flickering in rendering.