Fixed monkey patching in settings and user preferences unit tests.