fix some bug and add ent