Fixed ioctl error