Fix clear command losing reference to task #98

Bug was that clear command has troubles removing all tasks at one go.

Bug occurs when the relative list was changed during the forloop to
clear task.

This commit fixes it.