small fixes in chapter 3 and chapter 4