I just reverted this so `max_depth` doesn't underflow. Why do you need max depth to be unsigned?