[fix] add tests from @mmalecki, fixes #107