Join method, made parent determination more robust