Bug fixes

Thanks for the great tutorial and example. It gave me a big boost with node.js.
I fixed two small bugs. Can you have a look?