Fix LEAVE_LEADER bugs