Re-wrap functions, with new middleware

This shouldn't get stuck when it gets called a second time around