avoid '-1' value in prefs