Fixes #1165