fixes #802
Merge pull request #805 from enesakar/improvement/3.1/issue-802

fixes #802