fixes #2434
Merge pull request #2575 from mesutcelik/fix/3.2/issue2434

Fix/3.2/issue2434 - backport