Fixes for chapter 3