Fixed bug in export handler.