small changes to scheduler