Fix join handling