Fix crash condition in scheduler (take 3)