Fixed logic in mass line spreadsheet upload