Fixed fd@ and added ioctl.