Fix create models bug