Fixed the fps calculation