Bootstrap css not loading in some views

On some of my pages the bootstrap css doesn’t load properly. and on some it does. But when i view the page source. the bootstrap.css is there.

My AppAsset looks like this,


namespace frontend\assets;

use yii\web\AssetBundle;

 * Main frontend application asset bundle.
class AppAsset extends AssetBundle
    public $basePath = '@webroot';
    public $baseUrl = '@web';
    public $css = [
    public $js = [
    public $depends = [
         // here we add our FontAwesomeAsset bundle class

things like this don’t work, the panel doesn’t have borders and title is white

<div class="panel panel-default">
    <div class="panel-heading">
        <h3 class="panel-title">
            <img class="img-rounded" src="//" alt="">                    </h3>
        <ul id="w0" class="nav flex-column nav-pills"><li class="nav-item"><a class="nav-link" href="/yii2/frontend/web/index.php?r=user%2Fsettings%2Fprofile">Edit Profile</a></li>

<li class="nav-item"><a class="nav-link active" href="/yii2/frontend/web/index.php?r=user%2Fsettings%2Fnetworks">Networks</a></li></ul>
        <ul id="w1" class="nav flex-column nav-pills"><li class="nav-item"><a class="nav-link" href="/yii2/frontend/web/index.php?r=user%2Fsettings%2Fprofile">Reports Purchased</a></li></ul>

and in my views/layouts/main.php i have AppAsset::register($this); at the top of the file.

Any idea why? or how to fix this? I’m using yii2-bootstrap4