Fix: check the existance of webaudio instance before end event