fix bug making non-inverted not work on opengl