fixed some memory leaks in join collection