some clean up for sharing