chapter 6 fixes