fixed issue #12, #13