fix: flow data should be passed on before the flow ends, not after