Minor fixes in scheduler