Fix for #5636