Fix exporting function