fixed small bug in python script