Fixed bugs in join and operator=