script to fix index case issues