fix function exporting