sort cuts correctly