Fixes #1547.