minor fixes to schedule API and learning code