fixed issue #11 using the patch by MrHug