update_counter--
correctness++

And also re-construct the prefix correctly.