fixes model errors