fix appDelegate and python script