fix GetPreference warning

There was a warning about GetPreference(""), and the variable appears not to be used.