Fixes #1581