Fixed error on some cancel_schedule calls