possible fix for setRows function

Currently setRows function works improperly when we set less rows than table already has.
This commit suggests a possible solution for that bug.