Fixed linking and exporting files