Fix handling error in model, fix double li issue