fix some bug in model, fix indent