Fixes #1771