Fixes #885
Merge pull request #890 from mdogan/fix/3.1/issue885

Fixes #885