fixed issue #589