Fix undefined "onWaiting"