Fixed a comparison error for unexisting max_depth in quadtree