Pull request for issue #4681

Small patch to fix issue #4681