Fix main model definition