More bug fixes to import routines