Fixes #1036