do a better job of cleaning up fds