fixed issue #2 (probably issue #1)