Fix empty row bug