fix RenderTexture stage flipping

This is a fix for #211