fix(middleware): testcase failed