Fixing bugs for creation and order_num sorting functionality