Relationship fixes, #1054 needs testing