created a max FPS to fix event polling problem