Fixes #5642

Fixes #5642