Fix chapter 3. Closes #14.