Fixes #6224

As in title.