Fixed the issues of master detail updates in EF