Fixed a bug where events were not being handled properly
Changed the way export works