script to fix tag ids