Fixes #976