changed the way makeRenderLayer is executed