fix some errors in chapter 5