fixes fd problem