Fixes #5708

Fixes #5708