Fixes #1097