fixed issue #527