Fixes #1119.