bugfixes for sharing