fixes #2539
Merge pull request #2656 from eminn/maintenance-3.x

fixes #2539