better fix for #12557