proper fix for #2300