Added cleanup after rendering to texture