modify the auto template opeartion include update & delete template
fix some bug.