Fix #6017