compiles but segfaults during import