fixes #1294
Merge pull request #1295 from mdogan/fix/3.1/issue-1294

fixes #1294