a few minor changes to the example, and a bugfix