Fix: support maxdepth