fixes #1595
cancels schedules tasks when needed
fixes #1595
fix removing tasks
fixes #1595
fix removing tasks
Merge pull request #1613 from enesakar/maintenance-i-1595

[backport] fixes #1595