More fixes for #15
Merge pull request #20 from am11/master

More fixes for #15