Fix for pull request #4170