Fixed errors in chapter 5