Bug fix, handle empty rows