Fixes #1221