Fix select bug and add table setter & getter