fixed issue #535