Fixes #5011

Fixes #5011