Bug fix in join code.