Add application singleton
Use application singleton to avoid crashing