Improve stub middleware, no calls yet