This fixes #2759 in maintenance-3.x
Merge pull request #3228 from emrahkocaman/maintenance-3.x

This fixes #2759 in maintenance-3.x