fixes #685
Merge pull request #736 from enesakar/fix/3.1/issue-685

fixes #685