Fixed bug when considering User agent field.

Signed-off-by: Stefano Traverso <stefano.traverso@polito.it>