Fixes #1000.