make sure we only shut down the stream if we actually have an active stream