fixed AppDelegate