fix TestCommon tests
fix TestMiddleware tests