Fixed Export function