Fix #27

Please don't merge yet. I'm just unable to reproduce this bug on my machine, so triggering travis here.