fixed table selection bug