update after set scenario ?

I have a trouble when implement “change of password” for memember. I first create a scenario “changepass” for validate data after the users send via form. And it work successfull. But when i set new password for model account and save it, I get a new record in database. I think the scenario is not exactly, then i set it again and and not happen any thing:" no new record, and don’t update"

My code below:

 public function actionChangePass(){

        $account = TblAccount::model()->findByPk(Yii::app()->user->id);



            $account->attributes =$_POST['TblAccount'];

            $account->oldpassword = md5($account->oldpassword.Yii::app()->params['salt']);




                $account ->password = $account->oldpassword;



                $account->oldpassword ="";




thank for everything.