update code according to pep8
fix situation if sharer is user himself