diff --git a/extensions/README.md b/extensions/README.md
index a840f05..34ad967 100644
--- a/extensions/README.md
+++ b/extensions/README.md
@@ -9,7 +9,7 @@ To add a new extension named `xyz` (must be in lower case), take the following s
    * `CHANGELOG.md`
    * `LICENSE.md`
 3. ask Qiang to create a subsplit for `xyz` and a composer package named `yii2-xyz`;
-4. modify `/composer.json` and add `xyz` to the `replace` section;
+4. modify `/composer.json` and add `yiisoft/yii2-xyz` to the `replace` section;
 5. If an extension contains js/css files or depends on external bower packages:
    * create `bower.json`
    * ask Qiang to register a bower package with the name `yii2-xyz`
diff --git a/extensions/bootstrap/BootstrapAsset.php b/extensions/bootstrap/BootstrapAsset.php
index f9f6f0c..313a787 100644
--- a/extensions/bootstrap/BootstrapAsset.php
+++ b/extensions/bootstrap/BootstrapAsset.php
@@ -17,8 +17,8 @@ use yii\web\AssetBundle;
  */
 class BootstrapAsset extends AssetBundle
 {
-    public $sourcePath = '@bower/bootstrap';
+    public $sourcePath = '@bower/bootstrap/dist';
     public $css = [
-        'dist/css/bootstrap.css',
+        'css/bootstrap.css',
     ];
 }
diff --git a/extensions/bootstrap/BootstrapPluginAsset.php b/extensions/bootstrap/BootstrapPluginAsset.php
index aa30b53..6af1adc 100644
--- a/extensions/bootstrap/BootstrapPluginAsset.php
+++ b/extensions/bootstrap/BootstrapPluginAsset.php
@@ -17,9 +17,9 @@ use yii\web\AssetBundle;
  */
 class BootstrapPluginAsset extends AssetBundle
 {
-    public $sourcePath = '@bower/bootstrap';
+    public $sourcePath = '@bower/bootstrap/dist';
     public $js = [
-        'dist/js/bootstrap.js',
+        'js/bootstrap.js',
     ];
     public $depends = [
         'yii\web\JqueryAsset',
diff --git a/extensions/bootstrap/BootstrapThemeAsset.php b/extensions/bootstrap/BootstrapThemeAsset.php
index 94ecb40..60747a9 100644
--- a/extensions/bootstrap/BootstrapThemeAsset.php
+++ b/extensions/bootstrap/BootstrapThemeAsset.php
@@ -17,9 +17,9 @@ use yii\web\AssetBundle;
  */
 class BootstrapThemeAsset extends AssetBundle
 {
-    public $sourcePath = '@bower/bootstrap';
+    public $sourcePath = '@bower/bootstrap/dist';
     public $css = [
-        'dist/css/bootstrap-theme.css',
+        'css/bootstrap-theme.css',
     ];
     public $depends = [
         'yii\bootstrap\BootstrapAsset',
diff --git a/extensions/gii/TypeAheadAsset.php b/extensions/gii/TypeAheadAsset.php
index 1f467b7..49fd737 100644
--- a/extensions/gii/TypeAheadAsset.php
+++ b/extensions/gii/TypeAheadAsset.php
@@ -16,9 +16,9 @@ use yii\web\AssetBundle;
  */
 class TypeAheadAsset extends AssetBundle
 {
-    public $sourcePath = '@bower/typeahead.js';
+    public $sourcePath = '@bower/typeahead.js/dist';
     public $js = [
-        'dist/typeahead.bundle.js',
+        'typeahead.bundle.js',
     ];
     public $depends = [
         'yii\bootstrap\BootstrapAsset',
diff --git a/framework/web/AssetManager.php b/framework/web/AssetManager.php
index 824a08b..5960e16 100644
--- a/framework/web/AssetManager.php
+++ b/framework/web/AssetManager.php
@@ -268,9 +268,9 @@ class AssetManager extends Component
             $asset = $bundle->sourcePath . '/' . $asset;
         }
 
-        $n = strlen($asset);
+        $n = mb_strlen($asset);
         foreach ($this->assetMap as $from => $to) {
-            $n2 = strlen($from);
+            $n2 = mb_strlen($from);
             if ($n2 <= $n && substr_compare($asset, $from, $n - $n2, $n2) === 0) {
                 return $to;
             }
diff --git a/framework/widgets/MaskedInputAsset.php b/framework/widgets/MaskedInputAsset.php
index b758670..2325571 100644
--- a/framework/widgets/MaskedInputAsset.php
+++ b/framework/widgets/MaskedInputAsset.php
@@ -19,9 +19,9 @@ use yii\web\AssetBundle;
  */
 class MaskedInputAsset extends AssetBundle
 {
-    public $sourcePath = '@bower/jquery.inputmask';
+    public $sourcePath = '@bower/jquery.inputmask/dist';
     public $js = [
-        'dist/jquery.inputmask.bundle.js'
+        'jquery.inputmask.bundle.js'
     ];
     public $depends = [
         'yii\web\YiiAsset'
diff --git a/tests/unit/extensions/smarty/ViewRendererTest.php b/tests/unit/extensions/smarty/ViewRendererTest.php
index 2e5e329..92e0290 100644
--- a/tests/unit/extensions/smarty/ViewRendererTest.php
+++ b/tests/unit/extensions/smarty/ViewRendererTest.php
@@ -56,7 +56,7 @@ class ViewRendererTest extends TestCase
         $view = $this->mockView();
         $content = $view->renderFile('@yiiunit/extensions/smarty/views/layout.tpl');
 
-        $this->assertEquals(1, preg_match('#<script src="/assets/[0-9a-z]+/dist/jquery\\.js"></script>\s*</body>#', $content), 'Content does not contain the jquery js:' . $content);
+        $this->assertEquals(1, preg_match('#<script src="/assets/[0-9a-z]+/jquery\\.js"></script>\s*</body>#', $content), 'Content does not contain the jquery js:' . $content);
     }
 
 
diff --git a/tests/unit/extensions/twig/ViewRendererTest.php b/tests/unit/extensions/twig/ViewRendererTest.php
index 67366cc..cd13c81 100644
--- a/tests/unit/extensions/twig/ViewRendererTest.php
+++ b/tests/unit/extensions/twig/ViewRendererTest.php
@@ -39,7 +39,7 @@ class ViewRendererTest extends DatabaseTestCase
         $view = $this->mockView();
         $content = $view->renderFile('@yiiunit/extensions/twig/views/layout.twig');
 
-        $this->assertEquals(1, preg_match('#<script src="/assets/[0-9a-z]+/dist/jquery\\.js"></script>\s*</body>#', $content), 'Content does not contain the jquery js:' . $content);
+        $this->assertEquals(1, preg_match('#<script src="/assets/[0-9a-z]+/jquery\\.js"></script>\s*</body>#', $content), 'Content does not contain the jquery js:' . $content);
     }
 
     public function testAppGlobal()