Fixing Python scanner.