fixed issue #9
fixed issue #8