update model, fix bug