Fix DMEventHandler and make it cancellable