Fixed Entity Framework issues.