Fix table cell selection bug
Fix current element selection when updating the table