add fps counter and other fixes