Fix max depth