repair some bug