Fixes relation between entities