fix bug in prefs.js