Small changes in scheduler