Fixes #18
Merge pull request #19 from benastan/bugs/18

Fixes #18