fixed a few issues in export