ported some small fixes from yii1 version