Fixes #519.