Minor fix in scheduler