Drop invalid codes