Fixes #5291

Fixes #5291