diff --git a/fmapp2/src/com/caf/fmradio/Settings.java b/fmapp2/src/com/caf/fmradio/Settings.java
index 78a63f7..4a7c304 100644
--- a/fmapp2/src/com/caf/fmradio/Settings.java
+++ b/fmapp2/src/com/caf/fmradio/Settings.java
@@ -145,6 +145,7 @@
            mUserBandMinPref.getEditText().setInputType(InputType.TYPE_CLASS_NUMBER |
                                                         InputType.TYPE_NUMBER_FLAG_DECIMAL);
            mUserBandMinPref.setDialogTitle(R.string.usr_def_band_min);
+           mUserBandMinPref.getEditText().setSelectAllOnFocus(true);
 
            mUserBandMaxPref = new EditTextPreference(this);
            mUserBandMaxPref.setKey(USER_DEFINED_BAND_MAX_KEY);
@@ -152,6 +153,7 @@
            mUserBandMaxPref.setDialogTitle(R.string.usr_def_band_max);
            mUserBandMaxPref.getEditText().setInputType(InputType.TYPE_CLASS_NUMBER |
                                                         InputType.TYPE_NUMBER_FLAG_DECIMAL);
+           mUserBandMaxPref.getEditText().setSelectAllOnFocus(true);
 
            setBandSummary(index);
 
@@ -345,14 +347,10 @@
                   && (noOfChannels > 0) && (band_width >= 100)) {
                   FmSharedPreferences.setLowerLimit((int)freq);
                   sendSettingsChangedIntent(FM_BAND_CHANGED);
-                  setBandSummary(summaryBandItems.length - 1);
+                  setBandSummary(FmSharedPreferences.REGIONAL_BAND_USER_DEFINED);
                   clearStationList();
                }else {
-                  if ((Locale.getDefault().toString().equals("zh_HK")))
-                      Toast.makeText(this,"請輸入有效的頻道範圍76.0-108.0",
-                                                            Toast.LENGTH_SHORT).show();
-                  else
-                      Toast.makeText(this, getString(R.string.user_defind_band_msg),
+                  Toast.makeText(this, getString(R.string.user_defind_band_msg),
                                                             Toast.LENGTH_SHORT).show();
                }
            }else if(key.equals(USER_DEFINED_BAND_MAX_KEY)) {
@@ -373,14 +371,10 @@
                   && (noOfChannels > 0) && (band_width >= 100)) {
                   FmSharedPreferences.setUpperLimit((int)freq);
                   sendSettingsChangedIntent(FM_BAND_CHANGED);
-                  setBandSummary(summaryBandItems.length - 1);
+                  setBandSummary(FmSharedPreferences.REGIONAL_BAND_USER_DEFINED);
                   clearStationList();
                }else {
-                  if ((Locale.getDefault().toString().equals("zh_HK")))
-                      Toast.makeText(this,"請輸入有效的頻道範圍76.0-108.0",
-                                                            Toast.LENGTH_SHORT).show();
-                  else
-                      Toast.makeText(this, getString(R.string.user_defind_band_msg),
+                  Toast.makeText(this, getString(R.string.user_defind_band_msg),
                                                             Toast.LENGTH_SHORT).show();
                }
           }else {
