fixing regression errors relating to chapter 3