Fix GL rendering bug