Moving stream factory before send event to before building the stream. Closes #353