Fix ticket #6277