fix for 5619

This is a fix for #5619