table detection fix for mssql