Bug fix

Did not check the last row if they were empty.