fix #2620
https://github.com/yiisoft/yii/issues/2620