bugfix for Join
test for Join