Fix for issue #685