fix issues until Chapter 6