Judge shortage not the only reason for pending cases: Law ministry