Fixes to compatiblity with Yii standart begin