Fixed broken code in Chapter 5 code.