patch to close #221

Hello,

here's a patch to close #221.

Best regards,
Joris