Fix relationship exists check.