fix generate model