fixes #891
Merge pull request #892 from enesakar/fix/3.1/issue891

fixes #891