Chapter 4+5 fixes