Fixes #1226