Merge pull request #10 from stefanvangastel/master

Multiple fixes of some small bugs.
Merge remote-tracking branch 'upstream/master'