fixes #1595
cancel scheduled tasks when needed
fixes #1595
fix removing tasks
fixes #1595
fix removing tasks
Merge pull request #1612 from enesakar/master-issue-1595

fixes #1595