Fix the bug in __compact_table