correct some invalid states