fix errors on models