Script to fix inconsistent edition states