fixes #6599