Changed code to retrieve the table metadata at the first request