Moved frameClock outside function calls