Fixes for chapter 4, sec. 4