Fix middleware profile