fix the wrong type of config for the middleware