Resolve adoption-by-anonymous user issue, fix #362.