Chapter 5 - fixes #4.