Fixed bug with sorting: trunk should be sorted too