fixed issue #2
fixed issue #1