Update for middleware support