Updated with opengl bug fix