Fixed bug in code samples.  Thank you @drmad for catching this!