More changes for #16
Merge pull request #17 from WouterJ/fix_16

Finished #16