fix bug in lowercasing the table names