Import fixes

Fix some bugs that in the import process