correcting the final numbers for arbitrary tags