Fixing exporting function