Make the cleanup invocation work when called from the backup method