Fixed defect in "pending cases" hql query.