fixed error every time schedule updated