Sort tracks correctly, closes #50