--- a/src/playlist.c
+++ b/src/playlist.c
@@ -1074,7 +1074,7 @@
 static play_item_t *
 pl_pls_fetch (const char *const *lines, size_t index, void *data)
 {
-  if (++index > *(int *)data)
+  if (++index > *(unsigned int *)data)
     return NULL;
 
   char *key = g_strdup_printf ("file%d", index);
@@ -1358,58 +1358,25 @@
 {
   /* Helper function. Call only from playlist_add_mrl(). */
   int ret;
-  const char *tmp;
-
-  /*
-   * is this mrl in fact a simple filename?
-   */
-
-  tmp = mrl;
-  while (isalnum (*tmp) || *tmp == '-')
-    ++tmp;
-  if (isalpha (*mrl) && (tmp[0] != ':' || tmp[1] != '/'))
-  {
-    char *uri;
-
+  char *uri = make_path_uri (mrl);
+
+  if (uri) /* wasn't a URI - must be a local file */
+  {
 #ifdef PARSE_PLAYLISTS
     /* is it a playlist file? */
     ret = playlist_add_playlist_mrl (mrl, ins_pos);
-    if (ret != -2)
-      return ret;
+    if (ret == -2)
 #endif
-
-    if (!strncasecmp (mrl, "cdda:", 5))
-      return playlist_add_int (mrl, ins_pos);
-
-    if (mrl[0]!='/') {
-
-      /* make filename an absolute pathname */
-
-      char  buf[PATH_MAX];
-      char *pathname;
-      int   l1, l2;
-
-      getcwd (buf, sizeof (buf));
-
-      l1 = strlen(buf);
-      l2 = strlen(mrl);
-
-      pathname = g_malloc (l1+l2+2);
-      memcpy (pathname, buf, l1);
-      pathname[l1]='/';
-      memcpy (&pathname[l1+1], mrl, l2);
-      pathname[l1+l2+1]=0;
-
-      uri = g_filename_to_uri (pathname, NULL, NULL);
-      free (pathname);
-    }
-    else
-      uri = g_filename_to_uri (mrl, NULL, NULL);
-
-    ret = playlist_add_int (uri, ins_pos);
+    {
+      logprintf ("playlist: adding regular mrl %s\n", uri);
+      ret = playlist_add_int (uri, ins_pos);
+    }
     free (uri);
     return ret;
   }
+
+  if (!strncasecmp (mrl, "cdda:", 5))
+    return playlist_add_int (mrl, ins_pos);
 
   if (!strncasecmp (mrl, "mmshttp://", 10))
   {
@@ -2091,7 +2058,7 @@
     g_source_remove (browse_cb);
   browse_cb = g_timeout_add (1000, (GSourceFunc)playlist_browse_set, play_item);
 
-  snprintf (indices, 10, "%d", list_pos);
+  snprintf (indices, sizeof (indices), "%d", list_pos);
   path = gtk_tree_path_new_from_string (indices);
   gtk_tree_view_set_cursor (tree_view, path, NULL, FALSE);
   gtk_tree_path_free (path);