fix red-black tree