Fixes #1139