Fixes #1197.