Fixed getTableName method