Fix entity removal.