Added missing max depth parameter.