Changed function order.