Correctly check for widget isDisposed and make sure that the
tracelistener is removed