bugfix: the global max-depth value is not initialized and sometimes broken.
bugfix: the global max-depth value is not initialized and sometimes broken.

keisukefukuda/tapas,keisukefukuda/tapas,keisukefukuda/tapas