fixed opengl issues