Fixes #1026