fix sorted vec helper