Add test.
Merge pull request #22 from lamblin/fix_crash

Add test