minor bug fixes on sharing