Fixes #1701.