Using double for loop to check for zero rows always works
Fixes problem with indexd zero row check
Improves documentation and reduces logging.