Solved a bug in terminate task (OR, not ADD!)