Issue #4 preserve original table ids