fixed warnings reported by pyflakes
try to fix cocos/pyglet keeping objects referenced