Fixes #1277