Fixed incorrect function order.