fix some bugs in import