Rendering bug fix