Allow to stop the clearing action

Closes #1