Fixing file descriptors.