better fix for #2285