CR change: changed order of params of a middleware