Bug fix on export