Fix build_relation_field