Debugged a few sorts