Fixes for chapter 2