change ProfileMiddleware