Fix relationship insertion