Issue #4830 fix

Fix for issue #4830.