fixed frame rate issue #20