Fixed major error causing wrong analysis when multiple files are loaded