It was failing for data with only one row