corrected incorrect use of fdstate->fds  when we should use fdstate->indices