Fixing table selection and replacing it with configtable function