Clean up some sort api issues.