Fixed object not being removed from interface references in Entity.