fix code errors in chapter 11
so many errors in chapter 11