Fixes #6505