fixed NPE when creating imports.