fix for issue #682