Fix frame rate issue reported in #353