Fixes #971.