Fixes #1186
Merge pull request #1187 from JN-Jones/fix-1186

Fixes #1186