Updated exporter to fix some bugs