Fix the table counter problem in Undo logging and release part