fixed issue #30
fix to issue #34