Fixes #1158.