Fix an issue that launching the preference dialog doesn't work in 3.12.
Avoid breaking 3.10.