fix undoing an import