Bugs fixing

It's work for me, and fixed two errors when I export data