Fixed logging order.