Fixes #1366