Put the middleware back in