fix Model logic