fixed empty table bug