Fixed 'AppDelegate is not id<NSApplicationDelegate>' warning