Fixes #982