Fixed a bug that caused by incorrect content generating order.