Fixed invalid record bugs caused by wrong scanner.