fixed sorting fix2