Fixed bug that could occur when interrupting the workflow