fix join for smarter relation data