Fixed a Bug which failed when deleting an Entity

Change-Id: Ie08c48aaa87096cce27427b60bcd64b1215b13f9