fix for issue #4413

resubmit PR #4627