fixed a memory leak in the file parsers