fix crash during  app launch