scheduler bug fix