fixes #6806