fixed bugs https://github.com/hydroshare/hydroshare2/issues/86 and https://github.com/hydroshare/hydroshare2/issues/53