fixed error in how set schedule was being called.