Fixes for chapter 9