Modified average fps function further, a bit better now.