more bugfixes in export