Fixed up chap05 code.