Fix #6281

Closes #6281