fixed occasional "idleTime not defined" error