handle rpoxy error (i.e. 404 on remote host)
fix typo
return 500 on proxy error