Fixed a bug in the "sort by track number" algorithm