Bug fixes for Chapter 8.