Cleanup after switching to new version of middleware.