improve handing of application's startup