Fix useragent normalization and uri decoding