Fix relationship determination