Relation not being extended correctly