corrected errors in join operation