Modified render routine for performance