Fixed last_mod_id getting reset