Fix #6505