Fix schedulingAlgorithm bugs for unit test