Ionic 3 network status

Hello, i am not able to unsubscribe the observables when trying the following code.

//this is subscription from rxjs/subscription;
private _networkConnect :Subscription = new Subscription();
private _networkDisconnect: Subscription = new Subscription();

this._networkConnect = this.network.onConnect().subscribe(()=>{
alert(‘connected’)
})
this._networkDisconnect= this.network.onDisconnect().subscribe(()=>{
alert(“disconnected”)
})

if(condition){
this._networkConnect.unsubscribe();
this._networkDisconnect.unsubscribe();
}

Not able to unsubscribe from the above observables. Any leads would be appreciated.
Thank You.