bug fix for deleted records
bug fix