widget middleware: params: bug fix