Fix possible nullpointer in Preferences
Update TokenAutoComplete