Fixes #1077