Fix in pending cases report query.