Fixes #1240