As JojoX200 said, you need to soft-reset. It is a pain, but it's worth it. Due to how determining HP type works some types are rarer than others due to the change to legendaries and Pokemon that can't breed having a guaranteed three perfect IVs, so some Hidden Power combinations are impossible...