fixing model errors