Fixes #965