Fixes #1307