fix double used codes