Fix two bugs so example works
Merge pull request #5 from ariutta/master

Fix two bugs so example works