WIP fixing markDepth bug.