fix some bugs
finalize import