Fix destroy order.