Maybe you should use `pref.toLowerCase`? I see before the `List` you were comparing before had different text case for `text` in different parts of the code.