fix for issue #3633 on master branch