Fixed a bug for deleted apps