fix bugs of models