Fixed a crash or two in chapter 10

Signed-off-by: Zfish9 <Zfish9@hotmail.com>