some fixes for export with sharing