add $this->maxDepth to serialize / unserialize