fixed the table bug