diff --git a/res/values/strings.xml b/res/values/strings.xml
index e0964ba..6f5ac17 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -42,5 +42,6 @@
Qualitat inicial
Sel·lecciona la qualitat inicial de reproducció
+ 0
\ No newline at end of file
diff --git a/res/xml/prefs.xml b/res/xml/prefs.xml
index 2c6e7a5..8c903dd 100644
--- a/res/xml/prefs.xml
+++ b/res/xml/prefs.xml
@@ -1,5 +1,6 @@
-
-
\ No newline at end of file
+
+
+
diff --git a/src/com/upc/pbe/upcnews/HLS.java b/src/com/upc/pbe/upcnews/HLS.java
index a717bfd..72d0200 100644
--- a/src/com/upc/pbe/upcnews/HLS.java
+++ b/src/com/upc/pbe/upcnews/HLS.java
@@ -55,7 +55,7 @@ public class HLS
currentQuality = 0;
break;
case 1:
- currentQuality = (qualities.size()-1)/2;
+ currentQuality = (qualities.size())/2;
break;
case 2:
currentQuality = qualities.size()-1;
diff --git a/src/com/upc/pbe/upcnews/UpcApp.java b/src/com/upc/pbe/upcnews/UpcApp.java
index e36e9d5..c7a6d9a 100644
--- a/src/com/upc/pbe/upcnews/UpcApp.java
+++ b/src/com/upc/pbe/upcnews/UpcApp.java
@@ -20,7 +20,7 @@ public class UpcApp extends Application implements
private int quality;
public int getQuality(){
- quality = (int) prefs.getLong("selector", 0);
+ quality = (int) Integer.parseInt(prefs.getString("selector", "0"));
return quality;
}