Fixes #1029