Resolve problem with incorrect entity dependence