fix a few sharing issues