filter out duplicate joins