fix bugs of models.