repair some mistakes