Fixes #1317