fix appDelegate