Fix schema bug and optimize maxfetchdepth.