Fix bug #6124