fixes for issues in Chapter 7