fixed issue #7, #8