bugfix in parent relation assignment