Issue 1138

Fixes #1138