Small fix in scheduler