Fixed so later added items can be added to the start.
Fixed reversed type sort.