Fix fd problem