Initialize next_id