Render layers bug fix