fix coding problem when exporting