Fixes fps counter
Merge pull request #651 from claus/fps

Fixes render timing and fps counter