attempt to fix weird pyglet bug. I failed.. I have forgotten the face of my father!