Fix related tables with prefixes