Added some missing checks for deleted in queries for runs