fixes an error in python script