fix red-black tree undeterminism