Corrected bug when running without scheduler.