fix bug in export