Fix empty rows causing errors.