Changes to delete task when the last step is deleted.