Fixed error in python script