fix table selection