Fix math in the GL renderer.