Fixes #1245