fixes #652
Merge pull request #972 from gurbuzali/fix/3.x/issue652-master

fixes #652