fixes max wait for http request, other edits