diff --git a/framework/base/Widget.php b/framework/base/Widget.php
index ea7358d..95946ba 100644
--- a/framework/base/Widget.php
+++ b/framework/base/Widget.php
@@ -54,7 +54,7 @@ class Widget extends Component implements ViewContextInterface
         $config['class'] = get_called_class();
         /** @var Widget $widget */
         $widget = Yii::createObject($config);
-        self::$stack[] = $widget;
+        static::$stack[] = $widget;
 
         return $widget;
     }
@@ -67,8 +67,8 @@ class Widget extends Component implements ViewContextInterface
      */
     public static function end()
     {
-        if (!empty(self::$stack)) {
-            $widget = array_pop(self::$stack);
+        if (!empty(static::$stack)) {
+            $widget = array_pop(static::$stack);
             if (get_class($widget) === get_called_class()) {
                 echo $widget->run();
                 return $widget;
@@ -108,7 +108,7 @@ class Widget extends Component implements ViewContextInterface
     public function getId($autoGenerate = true)
     {
         if ($autoGenerate && $this->_id === null) {
-            $this->_id = self::$autoIdPrefix . self::$counter++;
+            $this->_id = static::$autoIdPrefix . static::$counter++;
         }
 
         return $this->_id;
diff --git a/framework/i18n/GettextMessageSource.php b/framework/i18n/GettextMessageSource.php
index 306da15..4ddd2ba 100644
--- a/framework/i18n/GettextMessageSource.php
+++ b/framework/i18n/GettextMessageSource.php
@@ -98,9 +98,9 @@ class GettextMessageSource extends MessageSource
     {
         $messageFile = Yii::getAlias($this->basePath) . '/' . $language . '/' . $this->catalog;
         if ($this->useMoFile) {
-            $messageFile .= static::MO_FILE_EXT;
+            $messageFile .= self::MO_FILE_EXT;
         } else {
-            $messageFile .= static::PO_FILE_EXT;
+            $messageFile .= self::PO_FILE_EXT;
         }
 
         return $messageFile;