fix bug not delete entity