fixing issue with invalid display count after addition of rows