Fixes #6597