Minor changes to python script