Fix situation where the rows indicated are less than 0. (For some reason, this can sometimes happen, not sure why). Fixes #19