Fix code.

There is a self that should be a this and a typo in a log message.  With this patch, I can get the examples to work properly.