Fix model errors