Reset the stream when detecting