fixes #654
Merge pull request #767 from enesakar/fix/3.1/issue-654

fixes #654