Fixes #1065