Fixes #1028