Fix a few bugs in the importer.
Merge pull request #7 from kloesing/importer-bugs

Fix a few bugs in the importer.