Fix: first_offset was never updated in SQL