fix for issue #497