Fixing bugs in component insertion during import