Made FPS counter threadsafe and more balanced.