repair some BUG