fix for issue #6
fix issue #10