Fixes #1387