fixed task deletion

this was probably broken in 40adc3395fa2e7f368edf4f98d05984de735e608