fixed bug with Model Class errors