fixed TableHasRows condition. Now he is checking if table has more than one row