Fixed bug in join()