Fixes #5259

Fixes #5259