debugged framerate limiter