Fix parent extraction in importer script