Changed writing TPO order.