fixed waitForInterrupt so it also works for DataRef, not only RootDataRef