[FIX] Clear last IDs after table cleaning.
[FIX] Clear corresponding IDs.