Fixes #866