fixed issue #529