fixes #991
Merge pull request #997 from enesakar/fix/master/issue991

fixes #991