Fixes #1248