diff --git a/system/codeigniter/CodeIgniter.php b/system/codeigniter/CodeIgniter.php
index 0078b45..4346027 100644
--- a/system/codeigniter/CodeIgniter.php
+++ b/system/codeigniter/CodeIgniter.php
@@ -198,8 +198,8 @@
}
// Call the requested method. Any URI segments present (besides the class/function)
- // will be passed to the method for convenience
- call_user_func_array(array(&$CI, $method), array_slice($RTR->rsegments, 2));
+ // will be passed to the method for convenience
+ call_user_func_array(array(&$CI, $method), array_slice($RTR->rsegments, (($RTR->fetch_directory() == '') ? 2 : 3)));
}
}