Hard to say without more information like the entire code, config settings and hardware setup. Are you using an external OSC?