fix bug with fds