fix backpressure path to use loop instead of recursion because of risk of stack overflow