Chapter 5 fixes