fixed fps function