appdelegate fix