Bug fixes, but still something wrong with the export