Fixed bug with export