Calling sort after initializing the list headers.