Fixes #1009