Fixing a bug in the file scanning code.