fixed a small bug that duplicated data rows