Update appdelegate