Fix regression introduced in bdb064e

Also add failing test for it
Merge pull request #8 from enriclluelles/master

Fix regression introduced in bdb064e