fix url generation in the middleware
update version