Bugfixes to the original example code

During the lesson we discovered two bugs in my example.
These are now corrected both in the context of the installed module and in the original example code made for pasting into Drupal...