fix select
fix ioctl
several fix