fixing linq to entities bug