Fixed filter issue when first rows remain after a filter's been applied

When a filter is applied resulting in the first few rows still remaining, there was an issue that the count was off and the last row was being pulled from the grid. fixed with if statement.