Entities relationship fixes.