fix previous commit of #3998 to work on stable branch
===VersionHistory:None===