some fixes in the export of units