chapter 4 fixes