fix some thing for kqueue