Fixes #1161