Proper fix for #2163.