fix the EMFILE error