fixed bug introduced while trying to consolidate relations