Fixes for chapter 7