Sort method fixed