Updated inconsistency

Just corrected a couple of errors in the code to bring it up to date with the book.