fixed "cannot redeclare getPref()" error