Fixes #1051

See #1051