Fixes issue #4085,
and Updated User Agent tests