Fixes #1271