fix for issue #685