Fixes #123, Fixes #124. (Bugs in Example 9-22.) Thanks @psychemedia!