Fixed error in code from source book.