fix bug for destroying