Fixed some instantiation orders.