Unit tests, fixed a bug in Scheduler