Implement stable sort to prevent card 'dancing' on sort