fixing crash in r.http