fix 2 small issues with sharedocs sevice. Fixes #678