Fixed chap09 code.