Fix edge cases of no Nhits and very many Nhits.
Fix edge cases of no Nhits and very many Nhits.

BenLand100/rat-pac,mastbaum/rat-pac,mastbaum/rat-pac,BenLand100/rat-pac,BenLand100/rat-pac,BenLand100/rat-pac,mastbaum/rat-pac,mastbaum/rat-pac,BenLand100/rat-pac,mastbaum/rat-pac