cocurrency bug fixed, and maxDepth() added