fix outer joins