Fixes #1027

Fixes #1027