Removing references from parents

Removing references from parents when changing relation
Merge pull request #111 from mrAdm/master

Removing references from parents