Index: /extensions/UserCollections/include/UserCollection.class.php
===================================================================
--- /extensions/UserCollections/include/UserCollection.class.php	(revision 26054)
+++ /extensions/UserCollections/include/UserCollection.class.php	(revision 26055)
@@ -73,5 +73,5 @@
       else
       {
-        throw new Exception(l10n('Invalid collection'), WS_ERR_INVALID_PARAM);
+        throw new Exception(l10n('Invalid collection'));
       }
     }
Index: /extensions/UserCollections/main.inc.php
===================================================================
--- /extensions/UserCollections/main.inc.php	(revision 26054)
+++ /extensions/UserCollections/main.inc.php	(revision 26055)
@@ -10,9 +10,4 @@
 
 defined('PHPWG_ROOT_PATH') or die('Hacking attempt!');
-
-if (mobile_theme())
-{
-  return;
-}
 
 global $conf, $prefixeTable;
@@ -29,32 +24,4 @@
 add_event_handler('init', 'user_collections_init');
 
-add_event_handler('ws_add_methods', 'user_collections_ws_add_methods');
-
-if (defined('IN_ADMIN'))
-{
-  add_event_handler('get_admin_plugin_menu_links', 'user_collections_admin_menu');
-}
-else
-{
-  // collections page
-  add_event_handler('loc_end_section_init', 'user_collections_section_init');
-  add_event_handler('loc_end_index', 'user_collections_page', EVENT_HANDLER_PRIORITY_NEUTRAL-10);
-
-  // thumbnails actions
-  add_event_handler('loc_end_index_thumbnails', 'user_collections_thumbnails_list', EVENT_HANDLER_PRIORITY_NEUTRAL-10, 2);
-
-  // picture action
-  add_event_handler('loc_end_picture', 'user_collections_picture_page');
-}
-
-// menu
-add_event_handler('blockmanager_register_blocks', 'user_collections_add_menublock');
-add_event_handler('blockmanager_apply', 'user_collections_applymenu');
-
-require_once(USER_COLLEC_PATH . 'include/ws_functions.inc.php');
-require_once(USER_COLLEC_PATH . 'include/functions.inc.php');
-require_once(USER_COLLEC_PATH . 'include/UserCollection.class.php');
-require_once(USER_COLLEC_PATH . 'include/events.inc.php');
-
 
 /**
@@ -63,13 +30,45 @@
 function user_collections_init()
 {
-  global $conf;
-
   include_once(USER_COLLEC_PATH . 'maintain.inc.php');
   $maintain = new UserCollections_maintain(USER_COLLEC_ID);
   $maintain->autoUpdate(USER_COLLEC_VERSION, 'install');
+  
+  if (mobile_theme())
+  {
+    return;
+  }
 
   load_language('plugin.lang', USER_COLLEC_PATH);
 
+  global $conf;
   $conf['user_collections'] = unserialize($conf['user_collections']);
+  
+  require_once(USER_COLLEC_PATH . 'include/ws_functions.inc.php');
+  require_once(USER_COLLEC_PATH . 'include/functions.inc.php');
+  require_once(USER_COLLEC_PATH . 'include/UserCollection.class.php');
+  require_once(USER_COLLEC_PATH . 'include/events.inc.php');
+  
+  add_event_handler('ws_add_methods', 'user_collections_ws_add_methods');
+
+  if (defined('IN_ADMIN'))
+  {
+    add_event_handler('get_admin_plugin_menu_links', 'user_collections_admin_menu');
+  }
+  else
+  {
+    // collections page
+    add_event_handler('loc_end_section_init', 'user_collections_section_init');
+    add_event_handler('loc_end_index', 'user_collections_page', EVENT_HANDLER_PRIORITY_NEUTRAL-10);
+
+    // thumbnails actions
+    add_event_handler('loc_end_index_thumbnails', 'user_collections_thumbnails_list', EVENT_HANDLER_PRIORITY_NEUTRAL-10, 2);
+
+    // picture action
+    add_event_handler('loc_end_picture', 'user_collections_picture_page');
+  }
+
+  // menu
+  add_event_handler('blockmanager_register_blocks', 'user_collections_add_menublock');
+  add_event_handler('blockmanager_apply', 'user_collections_applymenu');
 }
 
Index: /extensions/UserCollections/maintain.inc.php
===================================================================
--- /extensions/UserCollections/maintain.inc.php	(revision 26054)
+++ /extensions/UserCollections/maintain.inc.php	(revision 26055)
@@ -103,4 +103,6 @@
       pwg_query('ALTER TABLE `'.$prefixeTable.'collections` DROP `public`, DROP `public_id`;');
     }
+    
+    $this->installed = true;
   }
 
