template changes to reset the insertion mode appropriately