fix dataset and tag table relationship