Fix archive task deletion (issue #4265)