Python script fixes.