Ensure ordering is stable