better fix for #2988