Fixed addToRelationship bug.