Fixed regressions and new bugs in importing