fix embedded relations