fixed table bugs