Chapter 2: some fixes