fixed ioctl error