fix sorted