Fix #4509

Fixes the issue #4509