fixed issue #335