Fixes #861.