fixed TableHasRows - was checking if table has >1 rows instead of >0