Modify depth pruning flow