Fix for issue #3776