Small changes to support generic TableId