Fixed to handle unused fds.