minor fix to python script