Fixes #1196.