fix sorted issue