repair some gui bugs