Issue/228

Hi jfried,

Here's an attempt to fix #228.

Cheers,
Joris