fixes#2614 for maintenance-3.x
Merge pull request #2945 from hasancelik/fixes#2614-maintenance-3.x

fixes #2614 for maintenance-3.x