-BUGFIX: improved the relationship handling