fix for issue #3685