Fixes #1291