fixed broken entity relationships