Fixes #1217