Issue/228

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