Fixed a couple errors in the code sample.