Adding initial fix for issue #4, very crude