Fixed terrible OpenGL bug