Fixed EF issues