async fix, plus support for non-nginx