fix issue that would cause a fatal error when used outside Yii