Fixed a bug when `abort` gets called and there is no schedule callback.