fixed reference to old middleware_host variable