Changed the rendoring method