fix some models bugs